package com.elm.service.impl;

import com.elm.dao.BusinessDao;
import com.elm.entity.Business;
import com.elm.service.BusinessService;

import java.sql.SQLException;
import java.util.List;

public class BusinessServiceImpl implements BusinessService {
    private final BusinessDao businessDao;

    public BusinessServiceImpl() {
        businessDao = new BusinessDao();
    }
    @Override
    public Business getBusinessById(int businessId) {
        return businessDao.getBusinessById(businessId);
    }


    @Override
    public List<Business> getBusinessByOrderTypeId(String orderTypeId) throws SQLException {
        return businessDao.getBusinessByOrderTypeId(orderTypeId);
    }

}